const joi = require('joi')

const old = joi.string().pattern(/^[\S]{6,12}/)
// @ts-ignore
const pass = joi.not(joi.ref('old')).concat(old)
const checkPass = joi.ref('pass')


const phone = joi.number().integer().min(11).max(11)
const email = joi.string().email()


exports.teacher_pwdschema = {
    body: {
        old,
        pass,
        checkPass
    }
}

exports.teacher_infoschema = {
    phone, email
}